﻿<template>
      <!--send box s-->
  <div class="reginster_wrap">
    <div class="finish_msg_title">
      完善资料
    </div>
    <textarea class="text_area" resize="none" placeholder="填写宿舍通信地址" value="" ref="address">
         
    </textarea>
    <div class="next_step jump_this" v-on:click="next_junp">跳过此项</div>
    <div class="next_step" v-on:click="next">完成</div>
  </div>
</template>
<script>
  import {mapState, mapMutations,mapActions,mapGetters} from 'vuex';
  import qs from "qs";
  import { Toast, Indicator} from 'mint-ui';
export default {
  name: 'hello',
  data () {
    return {
      get_layer_show:this.$store.getters.get_layer_show
    }
  },
  ...mapActions([
    "thom_redirect",
  ]),
  ...mapMutations([
    "Change_certain_layer"
  ]),
  methods: {
    ...mapGetters([
      "get_user"
    ]),
    ...mapMutations(["Change_user"]),
    //页面跳转
    next: function () {
      if (this.$refs.address.value == "") {
        Toast("地址为空");
        return false
      }
      Indicator.open();
      let user = this.get_user();
      user.address = this.$refs.address.value
      this.$http.post('/yizhiweimen/api/user/updateUser',
        qs.stringify(
            user
        ))

        .catch((thrown) => {
          Toast({
            message: '网络出错',
            position: 'bottom',
            duration: 2000
          });
          Indicator.close()
        }).then((e) => {

          this.$store.dispatch("thom_redirect",
            {
              name: "/my_mess", router: this.$router
            });
          Indicator.close()
        })

      //设置user 提交

    },
    next_junp: function () {
      let user = this.get_user();
      this.$http.post('/yizhiweimen/api/user/updateUser',
        qs.stringify(
            user
        )
      )
        .catch((thrown) => {
          Toast({
            message: '网络出错',
            position: 'bottom',
            duration: 2000
          });
        }).then((e) => {
          this.$emit('hide_load');
          Toast({
            message: '获取信息成功',
            position: 'bottom',
            duration: 2000
          });
          this.menu_list = e.data;
          this.$store.dispatch("thom_redirect",
            {
              name: "/my_mess", router: this.$router
            });
        })

    }
  }
}
</script>
<style scoped>
  /*finish_msg s*/

   .text_area::-webkit-input-placeholder {
    text-align: left;
    color:#9f5c2f;
  }

  .text_area:-moz-placeholder {
    text-align: left;
    color: #9f5c2f;
  }

  .text_area:-ms-input-placeholder {
    text-align: left;
    color: #9f5c2f;
  }

  .reginster_wrap .jump_this {
    background-color: #3b9f2f;
    margin-top:1.2rem;
    margin-bottom:0.5rem;
  }
  .text_area {
    padding: 0;
    padding-top: 0.5rem;
    width: 82%;
    height: 4rem;
    border-radius: 2vw;
    margin: 0 auto;
    padding-left: 4%;
    border: 0;
    outline: none;
  } 
  .login_wrap .login_header_left {
    margin: 1rem 0 0 6%;
  } 
  .login_wrap .login_header_right {
    margin: 0.8rem 6% 0 0;
  } 
  .next_step {
    width: 86%;
    height: 1.75rem;
    line-height: 1.75rem;
    background-color: #9f5c2f;
    color: #fff;
    margin: 0 auto;
    border-radius: 2vw;
    font-size: 0.7rem;
  } 
  .input_list {
    margin-bottom: 0.8rem;
    text-align: center;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
  }
  .input_base::-webkit-input-placeholder {
    color: #9f5c2f;
    text-align: center;
    font-weight: 600;
    padding-right: 6%;
    padding-left: 0%;
  }

  .input_base:-moz-placeholder {
    text-align: center;
    color: #9f5c2f;
    padding-right: 6%;
    font-weight: 600;
    padding-left: 0%;
  }

  .input_base:-ms-input-placeholder {
    text-align: center;
    /* IE10+ */
    color: #9f5c2f;
    font-weight: 600;
    padding-right: 6%;
    padding-left: 0%;
  }
  .input_base {
    padding-left:6%;
    border: 0;
    outline: none;
    display: block;
    width: 80%;
    height: 1.7rem;
    line-height: 1.75rem;
    background-color: #fff;
    border-radius: 2vw;
    margin: 0 auto 0.5rem;
  } 
  .finish_msg_title {
    width: 37%;
    height: 1.4rem;
    line-height: 1.4rem;
    text-align: center;
    color: #9f5a30;
    font-size: 0.7rem;
    background-color: #fff;
    margin: 0.6rem auto 1.1rem;
    border-radius: 2vw;
    letter-spacing: 1px;
    font-weight: 700;
  } 
 /*finish_msg e*/
  .reginster_wrap {
    width: 100%;
    height: 100%;
  }
.certain_btn_inner{
  border:2px solid #9f5c2f;
  width: 86%;
  height: 1.75rem;
  line-height: 1.75rem;
  color: #ffffff;
  background-color: #9f5c2f;
  text-align: center;
  border-radius: 2vw;
  margin: 0 auto;
}
.inner_main_input{
  padding-right:6%;
  width: 74%;
}
*::-webkit-input-placeholder {
  text-align: center;
}

*:-moz-placeholder {
  text-align: center;
}

*:-ms-input-placeholder {
  text-align: center;
}

/*bottom_btn*/
.bottom_btn{
  width: 8rem;
  transform:translateX(-50%) ;
  position: absolute;
  bottom: 1.85rem;
  left:50%;
}

.bottom_left_btn{
  float: left;
  width: 3.5rem;
  height: 1rem;
  line-height:1.8;
  text-align: center;
  color: #9f5c2f;
  font-size: 0.6rem;
  background-color: #ffffff;
  border-radius: 1.4vw;
  letter-spacing: 1px;
}
.mid_line{
  margin-left: 0.35rem;
  margin-right: 0.35rem;
  float: left;
  width: 2px;
  background-color: #9f5c2f;
}
</style>

